﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:EtlViewer.Viewer.Controls">

    <Style TargetType="{x:Type local:SequenceObject}">
        <Setter Property="MinHeight" Value="60"/>
        <Setter Property="MinWidth" Value="150"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="BorderBrush" Value="#FF007ACC"/>
        <Setter Property="CornerRadius" Value="4"/>
        <Setter Property="LeadWidth" Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:SequenceObject}">
                    <Grid DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:SequenceObject}}}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Viewbox Stretch="Uniform" Width="100" Margin="20,0,20,0">
                            <TextBlock Text="{Binding Path=Title}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                        </Viewbox>
                        <Border BorderThickness="{TemplateBinding BorderThickness}" 
                                CornerRadius="{TemplateBinding CornerRadius}" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                Margin="10,0,10,0"/>
                        <Border Grid.Row="1" 
                                    Width="{TemplateBinding LeadWidth }" 
                                    HorizontalAlignment="Center" 
                                    BorderThickness="{TemplateBinding BorderThickness}" 
                                    BorderBrush="{TemplateBinding BorderBrush}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>